package com.hk.Ant;

	public class TestAnt {
		public String ant(int stage){
			String s = "11";
			for (int i = 0; i < stage; i++) {
				s= makeAnt(s);
			}
			return s;
		}
		
		public String makeAnt(String s){
			String t = "";
			char c = s.charAt(0);
			int count = 1;
			for (int i = 1; i <s.length() ; i++) {
				if(c==s.charAt(i)){
					count++;
				}else{
					t=t+c+count;
					c=s.charAt(i);
					count=1;
				}
			}
			t=t+c+count;
			return t;
		}
			
			public void print(int stage){
				for (int i = 0; i < stage; i++) {
					String s = ant(i);
					System.out.println(s);
					
				}
		
		}
	}
	